package com.dk.util;



import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.concurrent.*;

public class Test {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        ExecutorService pool = Executors.newFixedThreadPool(1);
        List<Future> list = new ArrayList<Future>();

        Callable c = new MyCallable("4");
        Future future = pool.submit(c);
        Set<String> set = (Set<String>) future.get();
        for (String ss :set){
            System.out.println(ss);
        }
        pool.shutdown();
        System.out.println(pool.isShutdown());

    }
}
